package com.SuanFa.NiuKe;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class a1 {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String input = reader.readLine();
        char[] charArray = input.toCharArray();
        StringBuilder builder = new StringBuilder();
        StringBuilder builder1 = new StringBuilder();
        for (char c : charArray) {
            if (c >= '0' && c <= '9') {
                builder.append(c);
            } else {
                builder.reverse();
                builder1.append(builder);
                builder1.append(c);
                builder.replace(0, builder.length(), "");
            }
        }
        if (builder1.length() == 1) {
            System.out.println(builder1);
        }
        builder1.append(builder.reverse());
        for (int i = 0; i < builder1.length(); i++) {
            if (builder1.charAt(i) == '0') {
                if (builder1.charAt(i + 1) < '0' || builder1.charAt(i + 1) > '9') {
                    break;
                } else {
                    builder1.deleteCharAt(i);
                    i--;
                }
            } else {
                break;
            }
        }
        for (int i = builder1.length() - 1; i >= 0; i--) {
            if (builder1.charAt(i) == '0') {
                if (builder1.charAt(i - 1) < '0' || builder1.charAt(i - 1) > '9') {
                    break;
                } else {
                    builder1.deleteCharAt(i);
                }
            } else {
                break;
            }
        }
        System.out.println(builder1);
    }
}

